"""empty message

Revision ID: 428ee4601ace
Revises: f7a9bfe5eb4e
Create Date: 2024-07-26 11:11:04.438598

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = '428ee4601ace'
down_revision = 'f7a9bfe5eb4e'
branch_labels = None
depends_on = None


def upgrade():
    op.add_column('evaluation_dataset', sa.Column('hash', sa.String(length=100), nullable=False, comment='QA对hash'))
    op.create_index('ix_task_id_hash', 'evaluation_dataset', ['task_id', 'hash'], unique=True)
    op.create_index('ix_created_on', 'evaluation_dataset', ['created_on'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_created_on', table_name='evaluation_dataset')
    op.drop_index('ix_task_id_hash', table_name='evaluation_dataset')
    op.drop_column('evaluation_dataset', 'hash')
    # ### end Alembic commands ###
